//
// Created by NOZOMI on 2023/6/20.
//

#ifndef TEST5_PROJECT_MYPUSHBUTTON_H
#define TEST5_PROJECT_MYPUSHBUTTON_H

#include <QPushButton>

class MyPushButton : public QPushButton{
Q_OBJECT
public:
//    explicit MyPushButton(QWidget *parent = nullptr);

    //重载方法
    //normalImg     代表正常显示的图片
    //pressImg      代表按下后显示的图片，默认为空
    explicit  MyPushButton(QString  normalImg,QString pressImg = "");

    QString    normalImgPath;   //默认显示图片路径
    QString    pressImgPath;   //按下后显示图片路径
    QImage     normalQImage;      //定义显示QImage的图片
    QImage     pressQImage;       //定义按下QImage的图片



    ~MyPushButton() override;

signals:


public slots:

    void zoom1();

    void zoom2();

    void paintEvent(QPaintEvent *);

    void mousePressEvent(QMouseEvent *e);

    void mouseReleaseEvent(QMouseEvent *e);

};


#endif //TEST5_PROJECT_MYPUSHBUTTON_H
